import React from 'react';

class MountLife extends React.Component {

    constructor(props){
        super(props);
        console.log('挂载阶段-1-constructor-构造器');
    }

    UNSAFE_componentWillMount(){
        console.log('挂载阶段-2-componentWillMount-准备挂载');
    }

    render() { 
        console.log('挂载阶段-3-render-渲染');
        return <div></div>;
    }

    componentDidMount(){
        console.log('挂载阶段-4-componentDidMount-已挂载');
    }
}
 
export default MountLife;